from machine import Timer

__version__ = "20240403"


def timer0_callback(timer):
    print("t0")


def timer1_callback(timer):
    print("t1")


def timer2_callback(timer):
    print("t2")


def timer3_callback(timer):
    print("t3")


# esp32 only 2 timers
def main():
    timer0 = Timer(0)
    timer0.init(period=1000, mode=Timer.PERIODIC, callback=timer0_callback)
    timer1 = Timer(1)
    timer1.init(period=200, mode=Timer.PERIODIC, callback=timer1_callback)
    # timer2 = Timer(2)
    # timer2.init(period=50, mode=Timer.PERIODIC, callback=timer2_callback)
    # timer3 = Timer(3)
    # timer3.init(period=300, mode=Timer.PERIODIC, callback=timer3_callback)


if __name__ == "__main__":
    main()
